﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Orid.Management.Statistics.Tools.Decomposition.Data
{
    class OrderFlowProgressOffline:OrderFlowProgress
    {
          string connectString, tableName;

          public OrderFlowProgressOffline()
        {
            this.connectString =  Config.Setting.SettingInstance.DBAddress_Online;
           
            tableName = Config.Setting.SettingInstance.OrderFlowProgress_Offline;
        }

        public override List<Orid.Management.Statistics.Tools.Decomposition.Model.ModelProgress> GetOrderFlowProgress(Guid? orderid)
        {
            try
            {

                if  (orderid == null)  
                {
                    return null;
                }

                return GetOrderFlowProgress(orderid, connectString, tableName);

            }
            catch (System.Data.SqlClient.SqlException ex)
            {
                throw (new Exception(ex.Message));
            }
        }

    }
}
